package com.imooc.springboot.dubbo.nilinili.res;

import com.alibaba.fastjson.JSON;

public class ResultFactory {
    public static String createResult(CodeEnum codeEnum, String message, Object object) {
        return JSON.toJSONString(new Result(codeEnum.getCode(), message, object));
    }

    public static String createResult(CodeEnum codeEnum, String message) {
        return JSON.toJSONString(new Result(codeEnum.getCode(), message));
    }
}
